package org.lee.strategy.app;

import java.math.BigDecimal;

/**
 * Context
 * 策略控制
 *
 * @author dralee
 * @date 2021-11-24 11:30:44
 **/
public class Context<T> {

    private ICouponDiscount<T> couponDiscount;

    public Context(ICouponDiscount<T> couponDiscount) {
        this.couponDiscount = couponDiscount;
    }

    public BigDecimal discountAmount(T couponInfo, BigDecimal skuPrice) {
        return couponDiscount.discountAmount(couponInfo, skuPrice);
    }
}
